<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="jquery.js" type="text/javascript"></script>
<script src="menu.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="style_menu.css" />

<script type="text/javascript">
	var passwordID=null;
	
	function loadPage(page) {
		$('#content').load(page);
	}
	function logout() {
		$.ajax({
			url : '../login/logout',
			type : 'GET',
			dataType : 'json',
			contentType : "application/json; charset=utf-8",
			success : function(result) {

			}
		});
		alert('Logged out');
		window.location.href = "main.html";
	}
	$(document).ready(function() {
		$.ajax({
			url : '../login/current_user',
			type : 'GET',
			dataType : 'json',
			contentType : "application/json; charset=utf-8",
			success : function(result) {
				$('#header').load('header.html');
				if (result == null) {
					$('#content').load('LoginUser.html');
				} else {
					$('#nav').load('menu.html');
					$('#content').load('passwords.html');

				}
			}
		});
	});
</script>
<title>PW-Manager</title>
</head>
<body>
	<table>
		<tr>
			<td colspan="2">
				<div id="header"></div>
			</td>
		</tr>
		<tr>
			<td valign="top">

				<div id="nav">
			
				</div>
			</td>
			<td valign="top" width="100%">
				<div id="content"></div>
			</td>
		</tr>
	</table>
</body>
</html>